package com.xuan.controller.cul;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xuan.configuration.result.ResponseResult;
import com.xuan.configuration.result.ResponseResultEnum;
import com.xuan.dto.cul.CulPageDto;
import com.xuan.pojo.cul.CulSixGua;
import com.xuan.service.cul.CulSixGuaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 六十四卦Controller
 */
@RestController
@RequestMapping("/culSixGua")
public class CulSixGuaController {

    @Autowired
    private CulSixGuaService culSixGuaService; // 六十四卦Service

//********************************************************************************************************************************

    /**
     * 分页查询
     *
     * @param dto 文化相关数据分页查询数据接收类
     * @return 分页数据
     */
    @PostMapping("/page")
    public ResponseResult<Page<CulSixGua>> page(@RequestBody CulPageDto dto) {

        Page<CulSixGua> page = culSixGuaService.page(dto);
        return ResponseResult.result(ResponseResultEnum.GET_SUCCESS, page);

    }


}
